package com.starlight.flower_server.infrastructure.repository;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.starlight.flower_server.domain.flowerUser.cqrs.FlowerUserPageQuery;
import com.starlight.flower_server.infrastructure.entity.FlowerUser;

import java.util.List;
import java.util.Map;

/**
 * @Author yfy2001
 * @date 2023/4/17 18:49
 */
public interface FlowerUserRepository {

    Integer insert(FlowerUser flowerUser);

    FlowerUser queryOneByUserDetail(FlowerUser flowerUserDetail);

    FlowerUser queryDetail(Long id);

    Integer logicDelete(Long id);

    Integer modify(FlowerUser flowerUser);

    /**
     * 用户名和邮箱是否存在
     * @param flowerUser
     * @return
     */
    boolean exists(FlowerUser flowerUser);

    Map<Long, FlowerUser> queryMap(List<Long> flowerUserIdList);

    IPage<FlowerUser> queryUserPage(FlowerUserPageQuery query);

    List<FlowerUser> queryAll();

    Long queryTotalCount();

}
